import React, { Component } from 'react'

export default class App extends Component {
  constructor(props){
    super(props);
    this.fileRef=React.createRef();
  }
  state={
    file:""
  }
  handleClick=(params)=>{
  console.log(this.fileRef)
  }
  render() {
    return (
      <div>
        <input type="file" ref={this.fileRef}/>
        <button onClick={this.handleClick}>获取filedom元素</button>
      </div>
    )
  }
}
